<template>
    <div class="boy">
        <h3>男人组件</h3>
        <div>金钱：{{ $store.state.money }}</div>
        <!-- <div>金钱：{{ money }}</div> -->
        <button @click="add1">搬砖+1</button>
        <button @click="addm2">搬砖+1</button>
        <button @click="add2">卖肾+100</button>
        <button @click="addm33(100)">搬砖十分钟+100</button>


    </div>
</template>

<script>
import { mapActions, mapMutations, mapState } from 'vuex'
export default {
    methods: {
        add1() {
            this.$store.commit('addm')
        },
        add2() {
            this.$store.commit('addm1', 100)
        },
        ...mapMutations(['addm2']),
        ...mapActions(['addm33']),


    },


}
</script>

<style>
button {
    padding: 5px;
    line-height: 30px;
    margin-left: 10px;
}
</style>
